package com.xlf.service.base.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xlf.common.core.pojo.vo.UserVO;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.HashMap;


@Data
@Accessors(chain = true)
public class ACMContestRankVO {

    @ApiModelProperty(value = "排名")
    private Integer rank;

    @ApiModelProperty(value = "用户Id")
    private Long userId;

    @ApiModelProperty(value = "用户信息")
    private UserVO userInfo;

    /**
     * 已通过的题目最大的提交时间 + 罚时 单位ms
     */
    @ApiModelProperty(value = "提交总时间")
    private Long totalTime;

    @ApiModelProperty(value = "ac题目数")
    private Integer acTotal;

    @ApiModelProperty(value = "有提交的题的提交详情")
    private HashMap<Long,ContestRecordVO> submissionInfo;


    @Data
    public static class ContestRecordVO {

        /**
         * 提交失败次数
         */
        private Integer failTotal;

        /**
         * 是否已AC
         */
        private Integer ac;

        /**
         * AC时间距离比赛开始时间的差，单位ms
         * */
        private Long acTime;

    }
}
